﻿<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
<!--[if lt IE 9]>
<script type="text/javascript" src="static/lib/html5shiv.js"></script>
<script type="text/javascript" src="static/lib/respond.min.js"></script>
<![endif]-->
<link rel="stylesheet" type="text/css" href="static/h-ui/css/H-ui.min.css" />
<link rel="stylesheet" type="text/css" href="static/h-ui.admin/css/H-ui.admin.css" />
<link rel="stylesheet" type="text/css" href="static/lib/Hui-iconfont/1.0.8/iconfont.css" />
<link rel="stylesheet" type="text/css" href="static/h-ui.admin/skin/default/skin.css" id="skin" />
<link rel="stylesheet" type="text/css" href="static/h-ui.admin/css/style.css" />

<!--[if IE 6]>
<script type="text/javascript" src="static/lib/DD_belatedPNG_0.0.8a-min.js" ></script>
<script>DD_belatedPNG.fix('*');</script>
<![endif]-->

<link rel="stylesheet" href="static/lib/zTree/v3/css/zTreeStyle/zTreeStyle.css" type="text/css">


<title>组织管理</title>
</head>
<body>

<nav class="breadcrumb">
    <i class="Hui-iconfont">&#xe67f;</i> 首页 
    <span class="c-gray en">&gt;</span> 系统管理
    <span class="c-gray en">&gt;</span> 组织管理
    
    <a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新" ><i class="Hui-iconfont">&#xe68f;</i></a>
</nav>

<div class="panel-wrap page-zzjg">
	<div class="panel-left">
    	<div class="panel-title cl">
        	<div class="l"><button class="btn radius Hui-iconfont Hui-iconfont-fenlei" type="button"> 展开</button> </div>
            <div class="r">
            	<button class="btn btn-primary radius" type="button"><i class="Hui-iconfont">&#xe600; </i>添加</button>
                <button class="btn btn-danger  radius" type="button"><i class="Hui-iconfont">&#xe6e2; </i>删除</button>
                <button class="btn btn-success  radius" type="button"><i class="Hui-iconfont">&#xe68f; </i>刷新</button>
            </div>	
        </div>
        <div class="tree">
            	<ul id="treeDemo" class="ztree"></ul>
        </div>
    	
    </div>
    <div class="panel-right">
    	<div class="panel-title cl">
        	<div class="l">
            	<button class="btn btn-primary radius" type="button"><i class="Hui-iconfont">&#xe600; </i> <span>添加</span> 保存</button>
            </div>
            <div class="r"></div>
            	
        </div>
    	<div class="page-container">
            <form action="" method="post" class="form form-horizontal" id="form-user-add">
            <input type="hidden" name="" value="">
            <fieldset class="pb-30">
            	<legend>添加部门</legend>
            	<div class="row cl">
                    <label class="form-label col-xs-4 col-sm-2">
                        <span class="c-red">*</span>部门名称：
                    </label>
                    <div class="formControls col-xs-6 col-sm-6">
                        <input type="text"  class="input-text" value="" placeholder="" id="user-name" name="product-category-name">
                    </div>
                </div>
                <div class="row cl">
                    <label class="form-label col-xs-4 col-sm-2">
                        <span class="c-red">*</span>所在部门：
                    </label>
                    <div class="formControls col-xs-6 col-sm-6">
                        <input type="text" readonly class="input-text" value="" placeholder="" id="user-name" name="product-category-name">
                    </div>
                </div>
                <div class="row cl">
                    <label class="form-label col-xs-4 col-sm-2">备注：</label>
                    <div class="formControls col-xs-6 col-sm-6">
                        <textarea name="" cols="" rows="" class="textarea"  placeholder="说点什么...最少输入10个" inputLength="20"></textarea>

                        
                    </div>
                </div>
                
            </fieldset>
            <fieldset>
            	<legend>部门位置</legend>
            	<div class="row cl">
                	<label class="form-label col-xs-4 col-sm-2">
						
					</label>
					<div class="formControls skin-minimal col-xs-8 col-sm-8 ">
               			<div class="radio-box">
							<input type="radio" id="sex-1" name="sex" value="1" data-rule-required="true">
							<label for="sex-1">同级部门最后位置</label>
						</div>
					</div>
                </div>
                <div class="row cl">
                    <label class="form-label col-xs-4 col-sm-2"></label>
                    <div class="formControls col-xs-6 col-sm-6">
						<div class="radio-box">
                        	<label><input type="radio" name="sex" value="1" data-rule-required="true">
							位于</label>
                            <span class="select-box inline" >
							<select class="select" size="1" name="city"  data-rule-required="true" __disabled  >
								<option value="" selected>选择省份</option>
                                <option value="" selected>1</option>
                                <option value="" selected>2</option>
                                <option value="" selected>3</option>
							</select>
							</span>
                            之前
						</div>
                    </div>
                </div>
                
            </fieldset>
            </form>
        </div>
    </div>
</div>









<!--_footer 作为公共模版分离出去-->
<script type="text/javascript" src="static/lib/jquery/1.9.1/jquery.min.js"></script>
<script type="text/javascript" src="static/lib/layer/2.4/layer.js"></script>
<script type="text/javascript" src="static/h-ui/js/H-ui.min.js"></script>
<script type="text/javascript" src="static/h-ui.admin/js/H-ui.admin.js"></script>
<script type="text/javascript" src="static/h-ui.admin/js/g-tool.js"></script>

<!--/_footer 作为公共模版分离出去-->

<!--请在下方写此页面业务相关的脚本-->
<script type="text/javascript" src="static/lib/zTree/v3/js/jquery.ztree.all-3.5.min.js"></script> 

<script type="text/javascript">




var setting = {
	view: {
		dblClickExpand: false,
		showLine: false,  //是否显示 连接线
		selectedMulti: false, //设置是否允许同时选中多个节点。默认值: true
		//showIcon:true , //是否显示图标
	},
		
	data: {
		simpleData: {
			enable:true, 
			idKey: "id",
			pIdKey: "pId",
			rootPId: ""
		},
		

	},
	callback: {
		beforeClick: function(treeId, treeNode, clickFlag) {
			console.log('beforeClick' ,treeId, treeNode);
			console.log( treeNode.id );
			/*var zTree = $.fn.zTree.getZTreeObj("tree");
			if (treeNode.isParent) {
				//zTree.expandNode(treeNode);
				return false;
			} else {
				console.log(treeNode.file);
				demoIframe.attr("src",treeNode.file + ".html");
				return true;
			}*/
			//return (treeNode.click != false);
			
		},
		onClick:function(event, treeId, treeNode, clickFlag){
		
		}
	}
};

var zNodes =[
			{ id:0, pId:-1, name:"父节点1 - 展开", open:true },
			{ id:1, pId:0, name:"父节点1 - 展开", open:true },
			{ id:11, pId:1, name:"父节点11 - 折叠"},
			{ id:111, pId:11, name:"叶子节点111"},
			{ id:112, pId:11, name:"叶子节点112"},
			{ id:113, pId:11, name:"叶子节点113"},
			{ id:114, pId:11, name:"叶子节点114"},
			{ id:12, pId:1, name:"父节点12 - 折叠"},
			{ id:121, pId:12, name:"叶子节点121"},
			{ id:122, pId:12, name:"叶子节点122"},
			{ id:123, pId:12, name:"叶子节点123"},
			{ id:124, pId:12, name:"叶子节点124"},
			{ id:13, pId:1, name:"父节点13 - 没有子节点", isParent:true},
			{ id:2, pId:0, name:"父节点2 - 折叠"},
			{ id:21, pId:2, name:"父节点21 - 展开", open:true},
			{ id:211, pId:21, name:"叶子节点211"},
			{ id:212, pId:21, name:"叶子节点212"},
			{ id:213, pId:21, name:"叶子节点213"},
			{ id:214, pId:21, name:"叶子节点214"},
			{ id:22, pId:2, name:"父节点22 - 折叠"},
			{ id:221, pId:22, name:"叶子节点221"},
			{ id:222, pId:22, name:"叶子节点222"},
			{ id:223, pId:22, name:"叶子节点223"},
			{ id:224, pId:22, name:"叶子节点224"},
			{ id:23, pId:2, name:"父节点23 - 折叠"},
			{ id:231, pId:23, name:"叶子节点231"},
			{ id:232, pId:23, name:"叶子节点232"},
			{ id:233, pId:23, name:"叶子节点233"},
			{ id:234, pId:23, name:"叶子节点234"},
			{ id:3, pId:0, name:"父节点3 - 没有子节点", isParent:true}
		];
		
var code;
		
function showCode(str) {
	if (!code) code = $("#code");
	code.empty();
	code.append("<li>"+str+"</li>");
}
		
$(document).ready(function(){
	var t = $("#treeDemo");
	zTree = $.fn.zTree.init(t, setting, zNodes);
	
	zTree.expandAll(true);//展开
	
	//demoIframe = $("#testIframe");
	//demoIframe.on("load", loadReady);
//	var zTree = $.fn.zTree.getZTreeObj("tree");
//	
//	console.log( zTree );
//	zTree.selectNode(zTree.getNodeByParam("id",'11'));
});
</script>
</body>
</html>